

function validateEmail()
{
           /* FUNCTION TO CHECK EMAIL */
		var emailToTest = document.getElementById('email').value;
		var reg =/^[A-Za-z0-9._]*\@[A-Za-z]*\.[A-Za-z]{2,5}$/;
		var regex=/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/;
		
         if(emailToTest.length === 0)
		{
			document.getElementById('err').innerHTML = "Please enter your e-mail ID";
			return false;
		} 
		 else if (!emailToTest.match(reg)) 
		{
			document.getElementById('err').innerHTML = "Invalid e-mail ID";
			 document.getElementById('email').value =" ";
			return false;
		}
		else if (!emailToTest.match(regex))
		{
			document.getElementById('err').innerHTML = "Invalid e-mail ID";
			 document.getElementById('email').value =" ";
			return false;
		
		}
		else
		{
			document.getElementById('err').innerHTML = " ";
			return true;
		}
}


function show()
{
    var valid= validateEmail();

	if(valid)
	{	
		document.getElementById("imageProcess").style.visibility = "visible";
		setInterval(function(){document.getElementById("imageProcess").style.visibility = "hidden";}, 3000);
		document.getElementById("button").style.display = "none";
		setTimeout(function()
		{
			document.getElementById("OTP").style.display="inline-block";
			document.getElementById("button").style.display = "none";
			document.getElementById("submitt").style.display="inline-block";
			document.getElementById("email").disabled=true;
		},3000);
	}
	
}